import {
	defineConfig
} from 'vite'
import {
	resolve
} from "path";
import vue from '@vitejs/plugin-vue';

const path = require('path')

function pathResolve(dir) {
	return resolve(__dirname, ".", dir);
}

// https://vitejs.dev/config/
export default defineConfig({
	plugins: [vue()],
	server: {
		host: 'localhost',
		//	https:true,
	},
	resolve: {
		alias: {
			'@': pathResolve("src"),
			'cmpt':`${pathResolve("src")}/components/`,
			'vCmpt':`${pathResolve("src")}/views/components/`,
			'loading':`${pathResolve("src")}/components/el-loading.vue`,
			'u3d':`${pathResolve("src")}/components/unity`,
			'mChart':`${pathResolve("src")}/components/chart/`,
		}
	},
	devServer: {
		// https: true,
		BASE_URL: "adfad",
	},
	// dev:{
	// 	URL:"adfasdf"
	// }

});